package com.yidaba.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.Toast;

public class FeedbackActivity extends Activity implements OnClickListener,OnItemSelectedListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.feedback);
		Spinner feedbacktypespinner = (Spinner)findViewById(R.id.feedbacktypespinner);
		ArrayAdapter sa = ArrayAdapter.createFromResource(this, R.array.feedbacktype_key, android.R.layout.simple_spinner_item);
		sa.setDropDownViewResource(android.R.layout.simple_spinner_item);
		feedbacktypespinner.setAdapter(sa);
		
		feedbacktypespinner.setOnItemSelectedListener(this);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		int checked = v.getId();
		if (checked == R.id.feedbackcommit) {
			Toast msg = Toast.makeText(this, "feedbackcommit", Toast.LENGTH_LONG);
			msg.show();
		}
	}

	@Override
	public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
			long arg3) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub
		
	}

}
